3.2.76 \(\int \frac {(a+b x^2)^2}{x^4 (c+d x^2)} \, dx\) [176]

Optimal. Leaf size=66 \[ -\frac {a^2}{3 c x^3}-\frac {a (2 b c-a d)}{c^2 x}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{c^{5/2} \sqrt {d}} \]

[Out]

-1/3*a^2/c/x^3-a*(-a*d+2*b*c)/c^2/x+(-a*d+b*c)^2*arctan(x*d^(1/2)/c^(1/2))/c^(5/2)/d^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {472, 211} \begin {gather*} -\frac {a^2}{3 c x^3}+\frac {(b c-a d)^2 \text {ArcTan}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{c^{5/2} \sqrt {d}}-\frac {a (2 b c-a d)}{c^2 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2)^2/(x^4*(c + d*x^2)),x]

[Out]

-1/3*a^2/(c*x^3) - (a*(2*b*c - a*d))/(c^2*x) + ((b*c - a*d)^2*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(c^(5/2)*Sqrt[d])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 472

Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_))/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegr
and[(e*x)^m*((a + b*x^n)^p/(c + d*x^n)), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[n
, 0] && IGtQ[p, 0] && (IntegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])

Rubi steps

\begin {align*} \int \frac {\left (a+b x^2\right )^2}{x^4 \left (c+d x^2\right )} \, dx &=\int \left (\frac {a^2}{c x^4}-\frac {a (-2 b c+a d)}{c^2 x^2}+\frac {(b c-a d)^2}{c^2 \left (c+d x^2\right )}\right ) \, dx\\ &=-\frac {a^2}{3 c x^3}-\frac {a (2 b c-a d)}{c^2 x}+\frac {(b c-a d)^2 \int \frac {1}{c+d x^2} \, dx}{c^2}\\ &=-\frac {a^2}{3 c x^3}-\frac {a (2 b c-a d)}{c^2 x}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{c^{5/2} \sqrt {d}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 64, normalized size = 0.97 \begin {gather*} -\frac {a^2}{3 c x^3}+\frac {a (-2 b c+a d)}{c^2 x}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{c^{5/2} \sqrt {d}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^2)^2/(x^4*(c + d*x^2)),x]

[Out]

-1/3*a^2/(c*x^3) + (a*(-2*b*c + a*d))/(c^2*x) + ((b*c - a*d)^2*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(c^(5/2)*Sqrt[d])

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 68, normalized size = 1.03

method result size
default \(\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{c^{2} \sqrt {c d}}-\frac {a^{2}}{3 c \,x^{3}}+\frac {a \left (a d -2 b c \right )}{c^{2} x}\) \(68\)
risch \(\frac {\frac {a \left (a d -2 b c \right ) x^{2}}{c^{2}}-\frac {a^{2}}{3 c}}{x^{3}}+\frac {\left (\munderset {\textit {\_R} =\RootOf \left (c^{5} d \,\textit {\_Z}^{2}+a^{4} d^{4}-4 a^{3} b c \,d^{3}+6 a^{2} b^{2} c^{2} d^{2}-4 a \,b^{3} c^{3} d +b^{4} c^{4}\right )}{\sum }\textit {\_R} \ln \left (\left (3 \textit {\_R}^{2} c^{5} d +2 a^{4} d^{4}-8 a^{3} b c \,d^{3}+12 a^{2} b^{2} c^{2} d^{2}-8 a \,b^{3} c^{3} d +2 b^{4} c^{4}\right ) x +\left (-a^{2} c^{3} d^{2}+2 a b \,c^{4} d -b^{2} c^{5}\right ) \textit {\_R} \right )\right )}{2}\) \(190\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)^2/x^4/(d*x^2+c),x,method=_RETURNVERBOSE)

[Out]

(a^2*d^2-2*a*b*c*d+b^2*c^2)/c^2/(c*d)^(1/2)*arctan(d*x/(c*d)^(1/2))-1/3*a^2/c/x^3+a*(a*d-2*b*c)/c^2/x

________________________________________________________________________________________

Maxima [A]
time = 0.68, size = 71, normalized size = 1.08 \begin {gather*} \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d} c^{2}} - \frac {a^{2} c + 3 \, {\left (2 \, a b c - a^{2} d\right )} x^{2}}{3 \, c^{2} x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^4/(d*x^2+c),x, algorithm="maxima")

[Out]

(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(d*x/sqrt(c*d))/(sqrt(c*d)*c^2) - 1/3*(a^2*c + 3*(2*a*b*c - a^2*d)*x^2)/
(c^2*x^3)

________________________________________________________________________________________

Fricas [A]
time = 1.06, size = 192, normalized size = 2.91 \begin {gather*} \left [-\frac {3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-c d} x^{3} \log \left (\frac {d x^{2} - 2 \, \sqrt {-c d} x - c}{d x^{2} + c}\right ) + 2 \, a^{2} c^{2} d + 6 \, {\left (2 \, a b c^{2} d - a^{2} c d^{2}\right )} x^{2}}{6 \, c^{3} d x^{3}}, \frac {3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {c d} x^{3} \arctan \left (\frac {\sqrt {c d} x}{c}\right ) - a^{2} c^{2} d - 3 \, {\left (2 \, a b c^{2} d - a^{2} c d^{2}\right )} x^{2}}{3 \, c^{3} d x^{3}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^4/(d*x^2+c),x, algorithm="fricas")

[Out]

[-1/6*(3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(-c*d)*x^3*log((d*x^2 - 2*sqrt(-c*d)*x - c)/(d*x^2 + c)) + 2*a^2*
c^2*d + 6*(2*a*b*c^2*d - a^2*c*d^2)*x^2)/(c^3*d*x^3), 1/3*(3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(c*d)*x^3*arc
tan(sqrt(c*d)*x/c) - a^2*c^2*d - 3*(2*a*b*c^2*d - a^2*c*d^2)*x^2)/(c^3*d*x^3)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (56) = 112\).
time = 0.39, size = 172, normalized size = 2.61 \begin {gather*} - \frac {\sqrt {- \frac {1}{c^{5} d}} \left (a d - b c\right )^{2} \log {\left (- \frac {c^{3} \sqrt {- \frac {1}{c^{5} d}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{c^{5} d}} \left (a d - b c\right )^{2} \log {\left (\frac {c^{3} \sqrt {- \frac {1}{c^{5} d}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {- a^{2} c + x^{2} \cdot \left (3 a^{2} d - 6 a b c\right )}{3 c^{2} x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)**2/x**4/(d*x**2+c),x)

[Out]

-sqrt(-1/(c**5*d))*(a*d - b*c)**2*log(-c**3*sqrt(-1/(c**5*d))*(a*d - b*c)**2/(a**2*d**2 - 2*a*b*c*d + b**2*c**
2) + x)/2 + sqrt(-1/(c**5*d))*(a*d - b*c)**2*log(c**3*sqrt(-1/(c**5*d))*(a*d - b*c)**2/(a**2*d**2 - 2*a*b*c*d
+ b**2*c**2) + x)/2 + (-a**2*c + x**2*(3*a**2*d - 6*a*b*c))/(3*c**2*x**3)

________________________________________________________________________________________

Giac [A]
time = 0.67, size = 71, normalized size = 1.08 \begin {gather*} \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d} c^{2}} - \frac {6 \, a b c x^{2} - 3 \, a^{2} d x^{2} + a^{2} c}{3 \, c^{2} x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^4/(d*x^2+c),x, algorithm="giac")

[Out]

(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(d*x/sqrt(c*d))/(sqrt(c*d)*c^2) - 1/3*(6*a*b*c*x^2 - 3*a^2*d*x^2 + a^2*c
)/(c^2*x^3)

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 90, normalized size = 1.36 \begin {gather*} \frac {a^2\,d}{c^2\,x}-\frac {a^2}{3\,c\,x^3}+\frac {a^2\,d^{3/2}\,\mathrm {atan}\left (\frac {\sqrt {d}\,x}{\sqrt {c}}\right )}{c^{5/2}}+\frac {b^2\,\mathrm {atan}\left (\frac {\sqrt {d}\,x}{\sqrt {c}}\right )}{\sqrt {c}\,\sqrt {d}}-\frac {2\,a\,b}{c\,x}-\frac {2\,a\,b\,\sqrt {d}\,\mathrm {atan}\left (\frac {\sqrt {d}\,x}{\sqrt {c}}\right )}{c^{3/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^2)^2/(x^4*(c + d*x^2)),x)

[Out]

(a^2*d)/(c^2*x) - a^2/(3*c*x^3) + (a^2*d^(3/2)*atan((d^(1/2)*x)/c^(1/2)))/c^(5/2) + (b^2*atan((d^(1/2)*x)/c^(1
/2)))/(c^(1/2)*d^(1/2)) - (2*a*b)/(c*x) - (2*a*b*d^(1/2)*atan((d^(1/2)*x)/c^(1/2)))/c^(3/2)

________________________________________________________________________________________